package com.sms.client.ui;

import com.google.gwt.user.client.ui.Anchor;

public class CMenuItem{
	private String id;
	private String displayMenu;
	private Boolean isActive;
	public CMenuItem(String id,Boolean isActive,String displayMenu){
		this.id = id;
		this.isActive = isActive;
		this.displayMenu = displayMenu;
	}
	
	public Boolean getIsActive() {
		return isActive;
	}
	public void setIsActive(Boolean isActive) {
		this.isActive = isActive;
	}
	
	public Anchor getMenuItem(){
		
		Anchor anchor = null;
		if(isActive){
			anchor = new Anchor(displayMenu);
			anchor.setStyleName("active");
			//  = "<a class=\"active\">"+displayMenu+"</a>";
		}else
			anchor = new Anchor(displayMenu);
//		FlowPanel flowPanel = new FlowPanel();
//		flowPanel.add(anchor);
//		flowPanel.getElement().setId(id);
//		HTML html =	new HTML(anchor);
//		html.getElement().setId(id);
		return anchor;
	}
	
	
}
